package com.kx.springmvc.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;

/**
 * @ClassName UserController
 * @Author Sun
 * @Date 2021/5/20 21:12
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @RequestMapping("/login")
    public String login(HttpSession session){
        session.setAttribute("user", "zhangsan");
        return "success";
    }
}
